// pending 进行中 resolved/fulfulled 成功 rejected 失败
const p1 = Promise.resolve(100)
p1.then(data => {
  console.log('data',data);
}).catch(err => {
  console.log('err',err);
})


const p2 = Promise.reject('err')

p2.then(data => {
  console.log('data',data);
}).catch(err => {
  console.log('err',err);
})